package aone

import "time"

type Namespace struct {
	Avatar           interface{} `json:"avatar"`
	CreatedAt        time.Time   `json:"created_at"`
	Description      string      `json:"description"`
	GroupCreatorRole string      `json:"group_creator_role"`
	ID               int64       `json:"id"`
	IsRecycled       bool        `json:"is_recycled"`
	Name             string      `json:"name"`
	OrganizationID   string      `json:"organization_id"`
	OwnerID          int64       `json:"owner_id"`
	ParentID         int64       `json:"parent_id"`
	Path             string      `json:"path"`
	Public           bool        `json:"public"`
	RepoCreatorRole  string      `json:"repo_creator_role"`
	State            interface{} `json:"state"`
	UpdatedAt        time.Time   `json:"updated_at"`
	VisibilityLevel  int64       `json:"visibility_level"`
}

type OpenSettings struct {
	FullName   string      `json:"full_name"`
	FullNameEn string      `json:"full_name_en"`
	ID         interface{} `json:"id"`
	IDPath     string      `json:"id_path"`
	Name       interface{} `json:"name"`
	RegionID   int64       `json:"region_id"`
}

type RepoMetaInfoList struct {
	Amount int64          `json:"amount"`
	Data   []RepoMetaInfo `json:"list"`
}

type RepoMetaInfo struct {
	AccessLevel          int64         `json:"access_level"`
	Archived             bool          `json:"archived"`
	AvatarURL            interface{}   `json:"avatar_url"`
	BuildsEnabled        bool          `json:"builds_enabled"`
	Checkemail           bool          `json:"checkemail"`
	CiToken              interface{}   `json:"ci_token"`
	CreatedAt            time.Time     `json:"created_at"`
	CreatorID            int64         `json:"creator_id"`
	DefaultBranch        string        `json:"default_branch"`
	Description          string        `json:"description"`
	ExceptBranch         string        `json:"except_branch"`
	HTTPURLToRepo        string        `json:"http_url_to_repo"`
	ID                   int64         `json:"id"`
	IsReview             bool          `json:"is_review"`
	IssuesEnabled        bool          `json:"issues_enabled"`
	LastActivityAt       time.Time     `json:"last_activity_at"`
	MergeRequestsEnabled bool          `json:"merge_requests_enabled"`
	Name                 string        `json:"name"`
	NameWithNamespace    string        `json:"name_with_namespace"`
	Namespace            Namespace     `json:"namespace"`
	NotificationLevel    int64         `json:"notification_level"`
	Owner                interface{}   `json:"owner"`
	Path                 string        `json:"path"`
	PathWithNamespace    string        `json:"path_with_namespace"`
	Permissions          Permissions   `json:"permissions"`
	Public               bool          `json:"public"`
	ResponsibleOwner     Author        `json:"responsibleOwner"`
	SharedRunnersEnabled bool          `json:"shared_runners_enabled"`
	SnippetsEnabled      bool          `json:"snippets_enabled"`
	SSHURLToRepo         string        `json:"ssh_url_to_repo"`
	TagList              []interface{} `json:"tag_list"`
	VisibilityLevel      int32         `json:"visibility_level"`
	WebURL               string        `json:"web_url"`
	WikiEnabled          bool          `json:"wiki_enabled"`
}

type GroupAccess struct {
	AccessLevel       int64 `json:"access_level"`
	NotificationLevel int64 `json:"notification_level"`
}

type ProjectAccess struct {
	AccessLevel       int64 `json:"access_level"`
	NotificationLevel int64 `json:"notification_level"`
}

type Permissions struct {
	GroupAccess   GroupAccess   `json:"group_access"`
	ProjectAccess ProjectAccess `json:"project_access"`
}

type Group struct {
	AccessLevel       int64       `json:"access_level"`
	AvatarURL         interface{} `json:"avatar_url"`
	Description       string      `json:"description"`
	ID                int64       `json:"id"`
	MembersCount      int64       `json:"members_count"`
	Name              string      `json:"name"`
	NameWithNamespace string      `json:"name_with_namespace"`
	OwnerID           int64       `json:"owner_id"`
	ParentID          int64       `json:"parent_id"`
	Path              string      `json:"path"`
	PathWithNamespace string      `json:"path_with_namespace"`
	ProjectsCount     int64       `json:"projects_count"`
	Type              string      `json:"type"`
	VisibilityLevel   int64       `json:"visibility_level"`
	WebURL            string      `json:"web_url"`
}
